package org.example.controller;

import org.example.service.UserService;
import org.example.service.impl.UserServiceImpl;
import org.example.vo.UserVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "user")
public class UserController {
    @Resource
    private UserService userService;

    @GetMapping(value = "getUserById")
    public UserVO getUserById(Long id) {
        return userService.getUserById(id);
    }

    @PostMapping(value = "updateById")
    public void updateById(@RequestBody UserVO userVO) {
        userService.updateById(userVO);
    }
}
